package com.yanqu.road.entity.activity.daomu.skillstrategy.passive.impl;

import com.yanqu.road.entity.activity.daomu.DaoMuAttribute;
import com.yanqu.road.entity.activity.daomu.config.DaoMuSkillConfig;
import com.yanqu.road.entity.activity.daomu.enums.DaoMuAttributeEnum;
import com.yanqu.road.entity.activity.daomu.skillstrategy.passive.ISkillPassiveStrategy;
import com.yanqu.road.entity.activity.daomu.skillstrategy.passive.req.DaoMuPassiveSkillCountAttributeReq;
import com.yanqu.road.utils.string.StringUtils;

/**
 * 陨玉
 */
public class SkillJadeFigurineStrategy implements ISkillPassiveStrategy {

    /**
     * 计算属性MAP
     * @param req
     */
    @Override
    public void countAttribute(DaoMuPassiveSkillCountAttributeReq req) {
        //技能配置
        DaoMuSkillConfig daoMuSkillConfig = req.getDaoMuSkillConfig();
        String[] skillParaArr = daoMuSkillConfig.getSkillPara().split("\\|");
        //提升最大血量千分比
        long addRate = Long.parseLong(skillParaArr[34]);
        //生命属性
        DaoMuAttribute attAttribute = req.getAttributeMap().get(DaoMuAttributeEnum.ATTRIBUTE_HP.getType());
        attAttribute.addAddRate(addRate);
    }
}
